package bairui.international.weixin.portal.miniapp.controller.product.product;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.lianjing.sh.project.commons.util.Util_FileDeal;
import com.lianjing.sh.spring.web.controller.base.action.Action;

import bairui.international.model.domain.jpa.TB_ProductRollImage;
import bairui.international.service.Service_ProductRollImage;

/**
 *
 * 显示滚动图片
 *
 * @generated
 * 
 * @see STest_C_Product_ShowSlideImg_Get 测试
 *
 */
@Controller
public class C_Product_ShowSlideImg_Get
 extends SC_Product_ShowSlideImg_Get 
{
	
	@Autowired private Service_ProductRollImage service_ProductRollImage;
	
	/**
	 * Get请求
	 */
	@Action(Get.class)
	@GetMapping(Get.RequestMappingValue)
	public void get(
		ModelMap map, HttpServletRequest request, HttpServletResponse response, 
		@PathVariable(name=Get.PathVariableName.RollImgId) long rollImgId
	) throws Exception {
		TB_ProductRollImage bean = service_ProductRollImage.findById(rollImgId);
		if(null != bean){
			Util_FileDeal.getImg(response, pathConfig.getPosition_Image_ProductRollImage()+bean.getFileUrl());
		}
	}
	

}
